package com.sz.admin.system.pojo.po.table;

import com.mybatisflex.core.query.QueryColumn;
import com.mybatisflex.core.table.TableDef;

// Auto generate by mybatis-flex, do not modify it.
public class SysFileTableDef extends TableDef {

    /**
     * <p>
 文件表
 </p>

 @author sz-admin
 @since 2024-11-25
     */
    public static final SysFileTableDef SYS_FILE = new SysFileTableDef();

    public final QueryColumn ID = new QueryColumn(this, "id");

    public final QueryColumn URL = new QueryColumn(this, "url");

    public final QueryColumn E_TAG = new QueryColumn(this, "e_tag");

    public final QueryColumn SIZE = new QueryColumn(this, "size");

    public final QueryColumn DIR_TAG = new QueryColumn(this, "dir_tag");

    public final QueryColumn CREATE_ID = new QueryColumn(this, "create_id");

    public final QueryColumn FILENAME = new QueryColumn(this, "filename");

    public final QueryColumn CREATE_TIME = new QueryColumn(this, "create_time");

    public final QueryColumn OBJECT_NAME = new QueryColumn(this, "object_name");

    public final QueryColumn CONTEXT_TYPE = new QueryColumn(this, "context_type");

    /**
     * 所有字段。
     */
    public final QueryColumn ALL_COLUMNS = new QueryColumn(this, "*");

    /**
     * 默认字段，不包含逻辑删除或者 large 等字段。
     */
    public final QueryColumn[] DEFAULT_COLUMNS = new QueryColumn[]{ID, URL, E_TAG, SIZE, DIR_TAG, CREATE_ID, FILENAME, CREATE_TIME, OBJECT_NAME, CONTEXT_TYPE};

    public SysFileTableDef() {
        super("", "sys_file");
    }

    private SysFileTableDef(String schema, String name, String alisa) {
        super(schema, name, alisa);
    }

    public SysFileTableDef as(String alias) {
        String key = getNameWithSchema() + "." + alias;
        return getCache(key, k -> new SysFileTableDef("", "sys_file", alias));
    }

}
